﻿using System;
using System.Collections.Generic;
using System.Text;
using WebCore.Dtos;

namespace WebCore.Repository
{
    public interface IRepository<TEntity, TKey>
    {
        TKey Create(TEntity entity);
        int Delete(TKey id);
        int DeleteBatch(List<TKey> ids);
        TEntity GetByKey(TKey id);
        int Update(TEntity entity);
        List<TEntity> Query(string cols, string where, object obj = null);
    }
    public interface IBaseRepository<TEntity, TKey>: IRepository<TEntity, TKey>
    {
        PagedResponseBase<TEntity> Query(PagedQueryCondition condition);
    }
}
